package com.game;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class StartScreen extends Activity implements OnClickListener {

	private Button viewGameItemButton;
	private Button editGameItemButton;
	private Button viewStepItemButton;
	private Button editStepItemButton;
	private Button viewGameButton;
	private Button editGameButton;
	private Button selectGameButton;
	private Button viewGameNameButton;

	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		viewGameItemButton = (Button) findViewById(R.id.viewGameItem_button);
		editGameItemButton = (Button) findViewById(R.id.editGameItem_button);
		viewGameItemButton.setOnClickListener(this);
		editGameItemButton.setOnClickListener(this);
		
		
		viewStepItemButton = (Button) findViewById(R.id.viewStepItem_button);
		editStepItemButton = (Button) findViewById(R.id.editStepItem_button);
		viewStepItemButton.setOnClickListener(this);
		editStepItemButton.setOnClickListener(this);
		
		viewGameButton = (Button) findViewById(R.id.viewGame_button);
		editGameButton = (Button) findViewById(R.id.editGame_button);
		viewGameButton.setOnClickListener(this);
		editGameButton.setOnClickListener(this);
		
		
		selectGameButton = (Button) findViewById(R.id.selectGame_button);
		viewGameNameButton = (Button) findViewById(R.id.viewGameName_button);
		selectGameButton.setOnClickListener(this);
		viewGameNameButton.setOnClickListener(this);
		
		

	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.viewGameItem_button:
			viewGameItem();
			break;
		case R.id.editGameItem_button:
			editGameItem();
			break;
		case R.id.viewStepItem_button:
			viewStepItem();
			break;
		case R.id.editStepItem_button:
			editStepItem();
			break;
		case R.id.viewGame_button:
			viewGame();
			break;
		case R.id.editGame_button:
			editGame();
			break;
		case R.id.selectGame_button:
			selectGame();
			break;
		case R.id.viewGameName_button:
			viewGameName();
			break;
		}

	}
	
	private void viewGameItem() {
		Intent intent = new Intent(this, ViewGameItemActivity.class);
		startActivity(intent);
	}

	private void editGameItem() {
		Intent intent = new Intent(this, EditGameItemActivity.class);
	    startActivity(intent);
	       
	}

	private void viewStepItem() {
		Intent intent = new Intent(this, ViewStepItemActivity.class);
	    startActivity(intent);
		
	}

	private void editStepItem() {
		Intent intent = new Intent(this, EditStepItemActivity.class);
	    startActivity(intent);
	}
	
	private void viewGame() {
		Intent intent = new Intent(this, ViewGameActivity.class);
	    startActivity(intent);
		
	}

	private void editGame() {
		Intent intent = new Intent(this, EditGameActivity.class);
	    startActivity(intent);
	}
	
	private void selectGame() {
		Intent intent = new Intent(this, GameSelect.class);
	    startActivity(intent);
		
	}

	private void viewGameName() {
		Intent intent = new Intent(this, ListGameActivity.class);
	    startActivity(intent);
	}
}
